different ways of calling methods in Java programming language